BusSelectControl : SimpleNumberControl{
	
	baseSetValue{ 
		arg theValue;
		value = theValue;
	}
	
	getGuiClass{
		^BusSelectControlView;
	}

	
} 

BusSelectControlView : BaseControlView{

	var popup;
	
	subInit{


		SCStaticText(container, Rect(0, 10, 120, 16)).string_(name);

		popup =SCPopUpMenu(container, Rect(130, 10, 50, 16))
			.items_(["0-1","2-3","4-5", "6-7", "8-9", "10-11", "12-13", "14-15", "16-17", "18-19"])
			.background_(Color.white)
			.canFocus_(false);


	}
	
	createContainer{
		container = SCCompositeView.new(parentContainer, 380@30);
		container.relativeOrigin_(true);}
		
		
				
	createActions{|target|
		popup.action_({ arg popup;
				target.setControlValue(name, popup.value * 2);
			})	
	}
	
	createControlMapEntries{|map|
		map.put(name, BusSelectValueSetter(popup));	
	}
		
}